home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ACCESS(3) MINTLIB LIBRARY FUNCTIONS ACCESS(3)
-
-
- N✓NA✓AM✓ME✓E
- access - determine accessibility of a file
-
- S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
- #include <unistd.h>
-
- int access(const char *path, int amode);
-
- D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
- path points to a path naming a file. access checks the
- named file for accessibility, using the real user ID and
- real group ID of the process. The bit pattern contained in
- amode is constructed as follows:
- 04: read
- 02: write
- 01: execute (search for directories)
- 00: check existence of file
-
- The owner of a file has permission checked with respect to
- the "owner" read, write and execute mode bits. Members of
- the file's group other than the owner have permissions
- checked with respect to the "group" mode bits, and all
- others have permissions checked with respect to the
- "other" mode bits. If the real user ID is 0 (super-user),
- success is always returned for any existing file.
-
- S✓SE✓EE✓E A✓AL✓LS✓SO✓O
- c✓ch✓hm✓mo✓od✓d(✓(3✓3)✓),✓, s✓st✓ta✓at✓t(✓(3✓3)✓)
-
- R✓RE✓ET✓TU✓UR✓RN✓N V✓VA✓AL✓LU✓UE✓ES✓S
- 0 if access is permitted. -1 if access is not permitted
- or if the file does not exist;
- errno is set to indicate the error.
-
- N✓NO✓OT✓TE✓E
- Under TOS or on a MS-DOS (TOS) file-system, this call is
- pretty bogus and can best be used to check for existence
- of the file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MiNT docs 0.1 3 March 1993 1
-
-
-